<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>学生成绩管理系统</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      background: linear-gradient(135deg, #4CAF50, #66BB6A);
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    h1 {
      text-align: center;
      color: white;
      font-size: 36px;
      margin-bottom: 40px;
      text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    }

    form {
      background-color: white;
      padding: 40px;
      border-radius: 12px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      width: 100%;
      max-width: 420px;
    }

    label {
      font-size: 16px;
      color: #333;
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
    }

    input[type="text"],
    input[type="password"],
    input[type="date"] {
      width: 100%;
      padding: 12px;
      margin: 10px 0;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 15px;
      box-sizing: border-box;
      background-color: #f9f9f9;
      transition: border-color 0.3s, box-shadow 0.3s;
    }

    input[type="text"]:focus,
    input[type="password"]:focus {
      border-color: #4CAF50;
      box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
      outline: none;
    }

    input[type="radio"] {
      margin: 0 5px;
    }

    input[type="submit"] {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #4CAF50, #66BB6A);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: background-color 0.3s, box-shadow 0.3s;
      margin-top: 10px;
    }

    input[type="submit"]:hover {
      background: linear-gradient(135deg, #45a049, #5da060);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    hr {
      border: 0;
      border-top: 1px solid #ddd;
      margin: 20px 0;
    }

    .button-link {
      display: inline-block;
      padding: 14px 50px;
      background: linear-gradient(135deg, #4CAF50, #66BB6A);
      color: white;
      text-align: center;
      text-decoration: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: bold;
      transition: background-color 0.3s, box-shadow 0.3s;
      width: 100%;
      max-width: 400px;
      margin: 10px auto;
      box-sizing: border-box;
    }

    .button-link:hover {
      background: linear-gradient(135deg, #45a049, #5da060);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
  </style>
</head>
<body>
<div>
  <h1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;学生成绩管理系统</h1>

  <!-- 登录表单 -->
  <form action="${pageContext.request.contextPath}/LoginServlet" method="POST" accept-charset="UTF-8">
    <label>角色:</label>
    <input type="radio" name="login" value="admin" required>管理员
    <input type="radio" name="login" value="user" required>普通用户

    <label for="username">用户名:</label>
    <input id="username" type="text" name="username" placeholder="请输入用户名" required>

    <label for="password">密码:</label>
    <input id="password" type="password" name="password" placeholder="请输入密码" required>

    <input type="submit" value="登录">

    <hr>

    <a href="register.jsp" class="button-link">没有账号? 点击注册</a>
  </form>
</div>
</body>
</html>
